<?php echo $javascript->link('jquery.min.js', false); ?>
<?php echo $javascript->link('jquery-ui-1.7.2.custom.min.js', false); ?>
<?php echo $javascript->link('button', false); ?>


<div class="detail">
    <div>
        <div>
            <img class="logo" src="<?php echo $html->url('/ftpfiles/icon/'.$entry->b64filename); ?>" />
        </div>

        <div class="user-action">
            <a href="<?php echo $html->url('/ftpfiles/index/'.$parentEntry->b64filename);?>" class="fg-button ui-state-default ui-corner-all">
                <span class="ui-icon ui-icon-arrowreturnthick-1-n"></span> 返回上级目录
            </a>
            <a href="<?php echo $html->url('/ftpfiles/download_from_ftp/'.$entry->b64filename);?>" class="fg-button ui-state-default ui-corner-all">
                <?php if ($entry->is_dir()): ?>
                    <span class="ui-icon ui-icon-folder-open"></span> FTP 浏览
                <?php else: ?>
                    <span class="ui-icon ui-icon-disk"></span> FTP 下载
                <?php endif; ?>
            </a>
            <?php if ($entry->is_dir()): ?>
                <a href="<?php echo $html->url('/ftpfiles/download_as_zip/'.$entry->b64filename);?>" class="fg-button ui-state-default ui-corner-all">
                <span class="ui-icon ui-icon-arrowthickstop-1-s"></span> 打包下载
                </a>
            <?php endif; ?>
            <a href="<?php echo $html->url('/ftpfiles/collection/'.$entry->b64filename);?>" class="fg-button ui-state-default ui-corner-all">
                <span class="ui-icon ui-icon-bookmark"></span> 加入收藏
            </a>
        </div>

        <ul class="information">
            <li class="fileName"><?php echo $html->link($entry->Name,'/ftpfiles/download_from_ftp/'.$entry->b64filename, array('style' => 'text-decoration:underline;')); ?></li>
            <li><br></li>
            <li class="fileInfo">软件大小: <?php echo $entry->Size; ?>
            <li class="fileInfo">更新时间: <?php echo date('Y-m-d H:i:s', $entry->mtime); ?>
            <li class="fileInfo">用户评分: <?php echo $entry->CommentGrade; ?>
            <li class="fileInfo">下载次数: <?php echo $entry->DownloadCount; ?>
            <li class="fileInfo">开发商: <?php echo $entry->Author; ?>
        </ul>

        <hr style="clear: both; border: 0; height: 0"/>

        <div class="description">
            <h2>软件介绍</h2>
            <?php echo $entry->Description; ?>
        </div>

        <?php if ($entry->is_dir()): ?>
            <?php $ls = $entry->ls(); if (!empty($ls['files'])): ?>
        <div class="files">
            <h2>文件浏览</h2>
            <table>
            <?php foreach($ls['files'] as $child): ?>
                <tr>
                    <td><?php echo $html->link($child->basename, '/ftpfiles/download_from_ftp/'.$child->b64filename); ?></td>
                    <td><?php echo $ftpman->smart_size($child->Size); ?></td>
                    <td><?php echo date('Y-m-d H:i:s', $child->mtime); ?></td>
                    <td>
                        <a href="<?php echo $html->url('/ftpfiles/download_from_ftp/'.$child->b64filename);?>" class="fg-button ui-state-default" title="<?php __('Download'); ?>"><span class="ui-icon ui-icon-disk"></span></a>
                    </td>
                </tr>
            <?php endforeach; ?>
            </table>
        </div>
            <?php endif; ?>
        <?php endif; ?>

        <div class="comment">
            <h2>用户评价</h2>
        </div>
    </div>
</div>
